package com.christianposta.learnddd.domain.shared;

public interface ValueObject<T> {

	/**
	 * Value objects are made up of attributes that describe a particular
	 * object/part of the domain. They do not have any identity, nor do they
	 * need any identity. Think of value objects as objects that represent
	 * a particular set of attributes at a particular moment, but are not
	 * tracked through a life cycle. For example, a value object of an address
	 * having 6735 N 24th St, Phoenix, AZ would be exactly the same (and could
	 * even be substitued for) a different object of address that has the
	 * same value. 
	 * 
	 * @return true if this object's attributes and the other object's
	 *         attributes are the same.
	 */
	boolean sameValueAs(T other);
}
